import {axios} from './request.js';

// 获取医院列表
export const getHospitalList = ()=>{
	return axios({
		url:'/prod-api/api/hospital/hospital/list'
	})
}
// 获取医院轮播图
export const getHospitalBanner = (id)=>{
	return axios({
		url:'/prod-api/api/hospital/banner/list',
		header:{
			"hospitalId":id
		}
	})
}

// 获取医院详细信息
export const getHospitalInfo = (id)=>{
	return axios({
		url:'/prod-api/api/hospital/hospital/'+id
	})
}
//  查询专家诊与普通诊的科室分类列表
export const getCategoryList = (data)=>{
	return axios({
		url:'/prod-api/api/hospital/category/list',
		data
	})
}
// 生成预约单
export const addHospital = (data)=>{
	return axios({
		url:'/prod-api/api/hospital',
		method:'post',
		data,
		header:{
			"Authorization":uni.getStorageSync("token")
		}
	})
}

// 获取预约列表 GET /prod-api/api/hospital/reservation/list?pageNum=1&pageSize=6
export const getReservationList = (data)=>{
	return axios({
		url:"/prod-api/api/hospital/reservation/list",
		header:{
			"Authorization":uni.getStorageSync("token")
		},
		data
	})
}

// 查询预约详情
export const getReservation = (id)=>{
	return axios({
		url:'/prod-api/api/hospital/reservation/'+id,
		header:{
			"Authorization":uni.getStorageSync("token")
		}
	})
}

// 查询当前账户下的就诊卡GET /prod-api/api/hospital/patient/list
export const getPatientList = ()=>{
	return axios({
		url:'/prod-api/api/hospital/patient/list',
		header:{
			"Authorization":uni.getStorageSync("token")
		}
	})
}

// 添加就诊卡 POST /prod-api/api/hospital/patient
export const addPatientApi = (data)=>{
	return axios({
		url:'/prod-api/api/hospital/patient',
		method:'post',
		header:{
			"Authorization":uni.getStorageSync("token")
		},
		data
	})
}



